All Questions
Tagged with arduinodevice-driver
7 questions
1vote
0answers
453views
Arduino code to control motor speed based on MPU-6050 sensor
I have been trying to create arduino code where my MPU6050 reads its angle and based on that angle, change the motor speed. For example, 45° is the max motor speed, 22° is roughly half speed, and so ...
4votes
1answer
776views
4x4 Matrix Keypad on Arduino UNO
I recently bought a 4x4 keypad. It is one like this: http://www.learningaboutelectronics.com/images/4x4-matrix-keypad-pinout.png Now every code I found on the net was either using a highly overloaded ...
4votes
1answer
225views
Attaching an interrupt to a member function
I am making my own optical encoders. Each of them follows the exact same structure, so I figured I'd lump all the encoder processing in a class, StepCounter. ...
2votes
1answer
735views
7-segment 4-digit display
Is there a better way to organize the methods within this program without compromising the clarity? Running through digits 0-9 with separate functions seems very bulky. ...
2votes
1answer
4kviews
Driving 7-segment displays
I made a little JavaScript app here that let people generate bitmap for generating characters. Currently it generate code of a dictionary. But I want to also generate a example that let them play like ...
11votes
1answer
2kviews
Door-opener program
I've been working on a little project on an Arduino and I need some help with making the code more efficient / cleaner. I really don't like the three for loops and ...
3votes
1answer
165views
Servo commands based on serial port input
Straight to the point: Can you give me pointers on how to make this code more maintainable? In the future, I want to add more more things to this, but first it should be easy to maintain/read. Should ...